import 'package:im_app/im/socket/router/WebRtcConsumerRouter.dart';

import 'DataChangeRouter.dart';
import 'GroupConsumerRouter.dart';
import 'HeartCheckRouter.dart';
import 'MessageConsumerRouter.dart';

class InitRouter {

  init(Map<String, CallbackData> callbackMap) {
    var messageConsumerRouter = MessageConsumerRouter();
    messageConsumerRouter.initCallback(callbackMap);

    var groupConsumerRouter = GroupConsumerRouter();
    groupConsumerRouter.initCallback(callbackMap);

    var dataChangeRouter = DataChangeRouter();
    dataChangeRouter.initCallback(callbackMap);

    var heartCheckRouter = HeartCheckRouter();
    heartCheckRouter.initCallback(callbackMap);

    var webRtcConsumerRouter = WebRtcConsumerRouter();
    webRtcConsumerRouter.initCallback(callbackMap);
  }
}

class CallbackData {
  Function decodeFunction;
  Function doFunction;

  CallbackData({ required this.decodeFunction, required this.doFunction });
}